<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>登录</title>
  <link href="/layui/css/layui.css" rel="stylesheet">
  <link rel="Shortcut Icon" href="/images/hospital.png" type="image/x-icon">
  <link rel="Bookmark" href="/images/hospital.png" type="image/x-icon">
</head>
<body>
<!-- 你的 HTML 代码 -->
<table id="loginInfo"></table>

<script src="/layui/layui.js"></script>
<script>
  layui.use(['table'], function(){
    var table = layui.table;
    table.render({
      elem : '#loginInfo'
      ,height: 472
      ,url: '/api/loginInfor/page' //数据接口
      ,page: true //开启分页
      ,cols: [[ //表头
        {field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}
        ,{field: 'loginIp', title: '登录IP', width:80}
        ,{field: 'loginBroswer', title: '所用浏览器', width:80, sort: true}
        ,{field: 'loginAddress', title: '登录地址', width:80}
        ,{field: 'username', title: '用户名'}
        ,{field: 'description', title: '描述'}
        ,{field: 'createDatetime', title: '登录时间', sort: true}
      ]]
      , response : {
        statusCode : 1
      }
      , parseData : function (res) {
        if (res.status == 1) {
          return {
            "code": res.status,
            "msg": res.message,
            "count": res.total,
            "data": res.data
          }
        }
      }
    });
  });
</script>
</body>
</html>